﻿using DryWCS.Model.Enum;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaskStatusEnum = DryWCS.Model.Enum.TaskStatusEnum;

namespace DryWCS.Model.Conveyor
{
    [SugarTable("Biz_ConveyorTask2")]
    public  class ConveyorTaskModel
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, IsNullable = false)]
        public int Id { get; set; }

        [SugarColumn(IsNullable = false,ColumnDescription ="任务Id=wms任务号")]
        public int TaskId { get; set; } 

        [SugarColumn(IsNullable = false, ColumnDescription = "任务类型")]
        public TaskType TaskType { get; set; }

        [SugarColumn(IsNullable = false, ColumnDescription = "设备Code")]
        public int ConveyorCarCode { get; set; }

        [SugarColumn(IsNullable = false, ColumnDescription = "锁定")]
        public bool IsLock { get; set; } = false;

        [SugarColumn(IsNullable = true, ColumnDescription = "任务状态")]
        public TaskStatusEnum Status { get; set; } = TaskStatusEnum.未执行;

        [SugarColumn(IsNullable = true, ColumnDescription = "创建时间")]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        [SugarColumn(IsNullable = true, ColumnDescription = "开始时间")]
        public DateTime StartTime { get; set; } = DateTime.Now;

        [SugarColumn(IsNullable = true, ColumnDescription = "结束时间")]
        public DateTime EndTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]
        public string Remark { get; set; }
    }
}
